package cn.enjoy.design.behavior.observe;

import cn.enjoy.design.behavior.observe.event.SubmitEvent;
import cn.enjoy.design.behavior.observe.listener.SystemLogListener;
import cn.enjoy.design.behavior.observe.listener.SystemNotifyListener;
import cn.enjoy.design.behavior.observe.manager.Manager;

/**
 * @author K
 * @date 2021/11/17 14:58
 */
public class ObserveTest {

    public static void main(String[] args) {
        SystemNotifyListener systemNotifyListener = new SystemNotifyListener();
        SystemLogListener systemLogListener = new SystemLogListener();
        Manager manager = new Manager();
        manager.subscribe(systemNotifyListener);
        manager.subscribe(systemLogListener);
        manager.handle(new SubmitEvent());
    }

}
